import numpy as np
from matplotlib import pyplot as plt
from matplotlib.tri import Triangulation
from mpl_toolkits.mplot3d import Axes3D

X = []
Y = []
Z = []
f = open("data/plot.txt","r")

for line in f.readlines():
    line = line.rstrip().split()
    x = float(line[0])
    y = float(line[1])
    z = float(line[2])
    X.append(x)    
    Y.append(y)
    Z.append(z)
f.close()

X = np.array(X)
Y = np.array(Y)
Z = np.array(Z)

fig = plt.figure()
ax = plt.axes(projection="3d")
ax.plot_trisurf(X,Y,Z, cmap="viridis")
plt.show()
